<!DOCTYPE html>

<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>module RubyXL::FontConvenienceMethods - rubyXL 3.4.35</title>


  <meta name="keywords" content="ruby,module,RubyXL::FontConvenienceMethods">


    <meta name="description" content="Documentation for the RubyXL::FontConvenienceMethods module">





<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
</script>

<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<link href="../css/fonts.css" rel="stylesheet">
<link href="../css/rdoc.css" rel="stylesheet">



<body id="top" role="document" class="module">
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
  <span aria-hidden="true">&#9776;</span>
</div>


<nav id="navigation" role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="../index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  

  

  

  

  

  


  <div class="nav-section">
    <h3>Instance Methods</h3>
    <ul class="link-list" role="directory">

      <li ><a href="#method-i-get_name">get_name</a></li>

      <li ><a href="#method-i-get_rgb_color">get_rgb_color</a></li>

      <li ><a href="#method-i-get_size">get_size</a></li>

      <li ><a href="#method-i-is_bold">is_bold</a></li>

      <li ><a href="#method-i-is_italic">is_italic</a></li>

      <li ><a href="#method-i-is_strikethrough">is_strikethrough</a></li>

      <li ><a href="#method-i-is_underlined">is_underlined</a></li>

      <li ><a href="#method-i-set_bold">set_bold</a></li>

      <li ><a href="#method-i-set_italic">set_italic</a></li>

      <li ><a href="#method-i-set_name">set_name</a></li>

      <li ><a href="#method-i-set_rgb_color">set_rgb_color</a></li>

      <li ><a href="#method-i-set_size">set_size</a></li>

      <li ><a href="#method-i-set_strikethrough">set_strikethrough</a></li>

      <li ><a href="#method-i-set_underline">set_underline</a></li>

    </ul>
  </div>



  <footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a></p>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.15.1.</p>
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>
</footer>

</nav>

<main role="main" aria-labelledby="module-RubyXL::FontConvenienceMethods">
  
  
    <ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
      
      <li>
        
        <a href="../RubyXL.html">RubyXL</a><span>::</span>
        
      </li>
      
      <li>
        
        <span>FontConvenienceMethods</span>
        
      </li>
      
    </ol>
  

  <h1 id="module-RubyXL::FontConvenienceMethods" class="anchor-link module">
    module RubyXL::FontConvenienceMethods
  </h1>

  <section class="description">
    
  </section>


  <section id="5Buntitled-5D" class="documentation-section anchor-link">









     <section id="public-instance-5Buntitled-5D-method-details" class="method-section anchor-link">
       <header>
         <h3>Public Instance Methods</h3>
       </header>


      <div id="method-i-get_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_name" title="Link to this method">
                <span class="method-name">get_name</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 21</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_name</span>
  <span class="ruby-identifier">name</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">val</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_rgb_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_rgb_color" title="Link to this method">
                <span class="method-name">get_rgb_color</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_rgb_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 29</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_rgb_color</span>
  <span class="ruby-identifier">color</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">color</span>.<span class="ruby-identifier">rgb</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-get_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-get_size" title="Link to this method">
                <span class="method-name">get_size</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="get_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 25</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">get_size</span>
  <span class="ruby-identifier">sz</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">sz</span>.<span class="ruby-identifier">val</span>
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_bold" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_bold" title="Link to this method">
                <span class="method-name">is_bold</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_bold-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 9</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_bold</span>
  <span class="ruby-identifier">b</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">b</span>.<span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_italic" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_italic" title="Link to this method">
                <span class="method-name">is_italic</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_italic-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 5</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_italic</span>
  <span class="ruby-identifier">i</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">i</span>.<span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          <p>Funny enough, but presence of &lt;i&gt; without value (equivalent to ‘val == nul`) means “italic = true”! Same is true for bold, strikethrough, etc</p>


        </div>





      </div>


      <div id="method-i-is_strikethrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_strikethrough" title="Link to this method">
                <span class="method-name">is_strikethrough</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_strikethrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_strikethrough</span>
  <span class="ruby-identifier">strike</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">strike</span>.<span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-is_underlined" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-is_underlined" title="Link to this method">
                <span class="method-name">is_underlined</span>
                <span class="method-args">()</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="is_underlined-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 13</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">is_underlined</span>
  <span class="ruby-identifier">u</span> <span class="ruby-operator">&amp;&amp;</span> (<span class="ruby-identifier">u</span>.<span class="ruby-identifier">val</span> <span class="ruby-operator">!=</span> <span class="ruby-keyword">false</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_bold" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_bold" title="Link to this method">
                <span class="method-name">set_bold</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_bold-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_bold</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">b</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BooleanValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_italic" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_italic" title="Link to this method">
                <span class="method-name">set_italic</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_italic-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 33</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_italic</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">i</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BooleanValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_name" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_name" title="Link to this method">
                <span class="method-name">set_name</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_name-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 49</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_name</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">name</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">StringValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_rgb_color" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_rgb_color" title="Link to this method">
                <span class="method-name">set_rgb_color</span>
                <span class="method-args">(font_color)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_rgb_color-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 57</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_rgb_color</span>(<span class="ruby-identifier">font_color</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">color</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">Color</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:rgb</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">font_color</span>.<span class="ruby-identifier">to_s</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_size" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_size" title="Link to this method">
                <span class="method-name">set_size</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_size-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_size</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">sz</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">FloatValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_strikethrough" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_strikethrough" title="Link to this method">
                <span class="method-name">set_strikethrough</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_strikethrough-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 45</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_strikethrough</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">strike</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BooleanValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


      <div id="method-i-set_underline" class="method-detail anchor-link ">
        <div class="method-header">

            <div class="method-heading">
              <a href="#method-i-set_underline" title="Link to this method">
                <span class="method-name">set_underline</span>
                <span class="method-args">(val)</span>
              </a>
            </div>

        </div>


          <div class="method-controls">
            <details class="method-source-toggle">
              <summary>Source</summary>
            </details>
          </div>



        <div class="method-description">

          <div class="method-source-code" id="set_underline-source">
            <pre><span class="ruby-comment"># File lib/rubyXL/convenience_methods/font.rb, line 41</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_underline</span>(<span class="ruby-identifier">val</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">u</span> = <span class="ruby-constant">RubyXL</span><span class="ruby-operator">::</span><span class="ruby-constant">BooleanValue</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:val</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">val</span>)
<span class="ruby-keyword">end</span></pre>
          </div>



          


        </div>





      </div>


    </section>

  </section>

</main>
</body>

